<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  
  <script type="text/javascript">
    var testDomplate = function()
    {
      test3();
    }
      
    window.ssonload = function()
    {
        var x = "local";
        eval("x=function(){alert(0)}");
        alert(x)
        alert(window.x)
        x();
    }    
    
    var test1 = function()
    {
        with(FBL)
        {
            var template = domplate({
                tag:
                    DIV("Hello World!")
            });

            template.tag.append({}, document.body, template);
        }    
    }    
    
    var test2 = function()
    {
        with(FBL)
        {
            var inputObject = {
                firstName: "Jan",
                lastName: "Odvarko"
            };
            
            var template = domplate(
            {
                tag:
                    DIV(
                        SPAN("First Name: "),
                        SPAN("$object.firstName"),
                        BR(),
                        SPAN("Last Name: "),
                        SPAN("$object.lastName")
                    )
            });
            
            
            template.tag.append({object: inputObject}, document.body, template);
        }    
    }
    
    
    var test3 = function()
    {
        var el = document.getElementById("d2");
        //el = document.body;
        
        with(FBL)
        {
            var inputObject = {
                label: "Click Me!"
            };
            
            var template = domplate(
            {
                tag:
                   BUTTON({"class": "green",
                          checked: "true",
                          type: "checkbox",
                          onclick: "$onButtonClick"},
                       "$object.label"
                    ),
            
                onButtonClick: function(event)
                {
                    alert("Hello World!");
                }
            });
            
            template.tag.insertAfter({object: inputObject}, el, template);
        }
    }
    
    
    
    
    
    
    
    
    
    
    
    
  </script>
  <script type="text/javascript" src="../content/firebug-lite-dev.js"></script>
  
  <!-- 
  <script src="../content/firebug/domplate.js" type="text/javascript"></script>
  <script src="zdomplate-1.1a.js" type="text/javascript"></script>
   -->
  <style type="text/css">
    .green {
        color:green;
    }
  </style>
  </head>
  <body>
  
  <div id="d1">1</div>
  <div id="d2">2</div>
  <div id="d3">3</div>

  </body>
</html>
